/**
 * There are <a href="https://www.hdzhx.com">邯郸智讯</a> code generation
 */
package com.boxin.ims.modules.wechat.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.BaseEntity;
import com.thinkgem.jeesite.modules.sys.entity.User;

/**
 * 三级推广配置文件Entity
 * @author zhangshanshan
 * @version 2016-03-14
 */
@Entity
@Table(name = "wp_recommend_config")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class RecommendConfig extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	private Long id; 			// 编号
	private Long userId; 		// 用户
	private String name; 		// 名称
	private Date createTime;	// 创建日期
	
	private String isOpen;			//是否开启	0:不开启		1:开启
	private Integer oneselfScore;	//自己所得积分
	private Integer parentScore;	//上级会员所得积分
	private Integer grandScore;	//上上级会员所得积分
	
	private String message;				//推广海报前发送的消息内容
	private String scoreMessage;		//自己得积分的消息内容
	private String parentMessage;		//上级得到积分后，下级发送的消息
	private String repetitionMessage;	//已是会员[重复关注]的消息
	
	private String recommendPic;		//推广海报图片
	private String recommendWords;		//推广海报广告词
	private String newHelp;				//新手帮助

	private Date startTime;	//开始时间
	private Date endTime;	//结束时间
	
	private String type;	//类型	0：得积分兑奖品		1：积分排名送奖品
	private String rankPic;	//排行榜页面图片
	private Integer rankNum;//显示数量
	
	private Integer exchangeNum;//积分兑换数量		0为不限制
	
	private Integer qrcodeX;
	private Integer qrcodeY;
	private Integer qrcodeWH;
	
	private Integer headimgX;
	private Integer headimgY;
	private Integer headimgWH;
	
	
	
	public RecommendConfig() {
		this.createTime = new Date();
		this.exchangeNum = 0;
	}

	public RecommendConfig(Long id){
		this();
		this.id = id;
	}
	
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	//@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_wechat_recommendConfig")
	//@SequenceGenerator(name = "seq_wechat_recommendConfig", sequenceName = "seq_wechat_recommendConfig")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	@Length(min=1, max=200)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	
	@NotNull
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getIsOpen() {
		return isOpen;
	}

	public void setIsOpen(String isOpen) {
		this.isOpen = isOpen;
	}

	public Integer getOneselfScore() {
		return oneselfScore;
	}

	public void setOneselfScore(Integer oneselfScore) {
		this.oneselfScore = oneselfScore;
	}

	public Integer getParentScore() {
		return parentScore;
	}

	public void setParentScore(Integer parentScore) {
		this.parentScore = parentScore;
	}

	public Integer getGrandScore() {
		return grandScore;
	}

	public void setGrandScore(Integer grandScore) {
		this.grandScore = grandScore;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getScoreMessage() {
		return scoreMessage;
	}

	public void setScoreMessage(String scoreMessage) {
		this.scoreMessage = scoreMessage;
	}

	public String getRepetitionMessage() {
		return repetitionMessage;
	}

	public void setRepetitionMessage(String repetitionMessage) {
		this.repetitionMessage = repetitionMessage;
	}

	public String getRecommendPic() {
		return recommendPic;
	}

	public void setRecommendPic(String recommendPic) {
		this.recommendPic = recommendPic;
	}

	public String getRecommendWords() {
		return recommendWords;
	}

	public void setRecommendWords(String recommendWords) {
		this.recommendWords = recommendWords;
	}

	public String getParentMessage() {
		return parentMessage;
	}

	public void setParentMessage(String parentMessage) {
		this.parentMessage = parentMessage;
	}

	public String getNewHelp() {
		return newHelp;
	}

	public void setNewHelp(String newHelp) {
		this.newHelp = newHelp;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getRankPic() {
		return rankPic;
	}

	public void setRankPic(String rankPic) {
		this.rankPic = rankPic;
	}

	public Integer getRankNum() {
		return rankNum;
	}

	public void setRankNum(Integer rankNum) {
		this.rankNum = rankNum;
	}

	public Integer getExchangeNum() {
		return exchangeNum;
	}

	public void setExchangeNum(Integer exchangeNum) {
		this.exchangeNum = exchangeNum;
	}

	public Integer getQrcodeX() {
		return qrcodeX;
	}

	public void setQrcodeX(Integer qrcodeX) {
		this.qrcodeX = qrcodeX;
	}

	public Integer getQrcodeY() {
		return qrcodeY;
	}

	public void setQrcodeY(Integer qrcodeY) {
		this.qrcodeY = qrcodeY;
	}

	public Integer getQrcodeWH() {
		return qrcodeWH;
	}

	public void setQrcodeWH(Integer qrcodeWH) {
		this.qrcodeWH = qrcodeWH;
	}

	public Integer getHeadimgX() {
		return headimgX;
	}

	public void setHeadimgX(Integer headimgX) {
		this.headimgX = headimgX;
	}

	public Integer getHeadimgY() {
		return headimgY;
	}

	public void setHeadimgY(Integer headimgY) {
		this.headimgY = headimgY;
	}

	public Integer getHeadimgWH() {
		return headimgWH;
	}

	public void setHeadimgWH(Integer headimgWH) {
		this.headimgWH = headimgWH;
	}
	
	
}
